<!DOCTYPE html>
<html ng-app="MyApp">
<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <title>oauth2 demo with angularjs and springboot</title>
  <link href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.0/css/bootstrap.min.css" rel="stylesheet">
</head>
<body>
<div ng-controller="AppCtrl as vm" class="navbar navbar-default navbar-static-top">
  <ul class="nav navbar-nav">
    <li><a href="/#/">Home</a></li>
    <li ng-if="vm.isAuthenticated()"><a href="/#/profile">Profile</a></li>
  </ul>
  <ul ng-if="!vm.isAuthenticated()" class="nav navbar-nav pull-right">
    <li><a href="/#/login">Login</a></li>
  </ul>
  <ul ng-if="vm.isAuthenticated()" class="nav navbar-nav pull-right">
    <li><a ng-click="vm.Logout()">Logout</a></li>
  </ul>
</div>

<div ui-view></div>

<% if (webpackConfig.metadata.ENV === 'dev') { %>
<!-- webpack dev server reload -->
<script src="http://<%= webpackConfig.metadata.host %>:<%= webpackConfig.metadata.port %>/webpack-dev-server.js"></script>
<!-- end webpack dev server reload -->
<% } %>

</body>
</html>
